package com.six.vo;

import java.sql.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 过户单
 * 
 */
@Entity
@Table(name="WMS_T_TRANSFER")
public class Transfer {
	private int transferID;// VARCHAR(16) 过户单系统编号
	private String transferCode;// NCHAR(13) 过户单可视编号
	private Date transferDate;// DATE 过户时间
	private String transferState;// VARCHAR(16) 过户单状态
	private String transferNote;// NVARCHAR2(512) 备注
	private Date transferEditTime;// DATE 最后编辑时间
	private int transferIsDel;// SMALLINT 是否已被删除
	private Customer transferVender;
	private Customer transferBuyer;
	private User user;
	private Set<TransferDetail> transferDetail;
	
	
	public Transfer() {
		super();
	}
	public Transfer(int transferID, String transferCode, Date transferDate,
			String transferState, String transferNote, Date transferEditTime,
			int transferIsDel, Customer transferVender, Customer transferBuyer,
			User user, Set<TransferDetail> transferDetail) {
		super();
		this.transferID = transferID;
		this.transferCode = transferCode;
		this.transferDate = transferDate;
		this.transferState = transferState;
		this.transferNote = transferNote;
		this.transferEditTime = transferEditTime;
		this.transferIsDel = transferIsDel;
		this.transferVender = transferVender;
		this.transferBuyer = transferBuyer;
		this.user = user;
		this.transferDetail = transferDetail;
	}
	@Id
	@GeneratedValue
	public int getTransferID() {
		return transferID;
	}
	public void setTransferID(int transferID) {
		this.transferID = transferID;
	}
	public String getTransferCode() {
		return transferCode;
	}
	public void setTransferCode(String transferCode) {
		this.transferCode = transferCode;
	}
	public Date getTransferDate() {
		return transferDate;
	}
	public void setTransferDate(Date transferDate) {
		this.transferDate = transferDate;
	}
	public String getTransferState() {
		return transferState;
	}
	public void setTransferState(String transferState) {
		this.transferState = transferState;
	}
	public String getTransferNote() {
		return transferNote;
	}
	public void setTransferNote(String transferNote) {
		this.transferNote = transferNote;
	}
	public Date getTransferEditTime() {
		return transferEditTime;
	}
	public void setTransferEditTime(Date transferEditTime) {
		this.transferEditTime = transferEditTime;
	}
	public int getTransferIsDel() {
		return transferIsDel;
	}
	public void setTransferIsDel(int transferIsDel) {
		this.transferIsDel = transferIsDel;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="transferVender") 	 // VARCHAR(16) 卖方
	public Customer getTransferVender() {
		return transferVender;
	}
	public void setTransferVender(Customer transferVender) {
		this.transferVender = transferVender;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="transferBuyer") 	 // VARCHAR(16) 买方
	public Customer getTransferBuyer() {
		return transferBuyer;
	}
	public void setTransferBuyer(Customer transferBuyer) {
		this.transferBuyer = transferBuyer;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="userID") 	 // VARCHAR(16) 操作员编号
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@OneToMany(cascade=CascadeType.ALL)
	public Set<TransferDetail> getTransferDetail() {
		return transferDetail;
	}
	public void setTransferDetail(Set<TransferDetail> transferDetail) {
		this.transferDetail = transferDetail;
	}
	

}
